package com.xuecheng.content.api;

import com.xuecheng.commons.model.vo.CoursePubVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.TeachplanVo;
import com.xuecheng.commons.utils.BeanHelper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("xc-content-service")
public interface ContentClient {
    //查询所有已发布课程
    @GetMapping("/coursePub/findAll")
    public ResponseResult<List<CoursePubVo>> findAll();
    //根据id查询已发布课程
    @GetMapping("/coursePub/{id}")
    public ResponseResult<CoursePubVo> findById(@PathVariable("id") Long id);
    //根据id查询课程计划
    @GetMapping("/teachplan/{teachplanId}")
    public ResponseResult<TeachplanVo> findPlanById(@PathVariable("teachplanId") Long teachplanId);
}
